package tmp;

// Generated 04-nov-2009 18:40:40 by Hibernate Tools 3.2.4.GA

import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;

/**
 * Phase generated by hbm2java
 */
@Entity
@Table(name = "phase", catalog = "fmanzano_gem", uniqueConstraints = @UniqueConstraint(columnNames = "FAS_NAME"))
public class Phase implements java.io.Serializable {

	private Integer fasId;
	private String fasDescription;
	private String fasName;
	private Set<ExpedientTypePhases> expedientTypePhaseses = new HashSet<ExpedientTypePhases>(
			0);
	private Set<ExpedientTypePhaseExpedients> expedientTypePhaseExpedientses = new HashSet<ExpedientTypePhaseExpedients>(
			0);

	public Phase() {
	}

	public Phase(String fasName) {
		this.fasName = fasName;
	}

	public Phase(String fasDescription, String fasName,
			Set<ExpedientTypePhases> expedientTypePhaseses,
			Set<ExpedientTypePhaseExpedients> expedientTypePhaseExpedientses) {
		this.fasDescription = fasDescription;
		this.fasName = fasName;
		this.expedientTypePhaseses = expedientTypePhaseses;
		this.expedientTypePhaseExpedientses = expedientTypePhaseExpedientses;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "FAS_ID", unique = true, nullable = false)
	public Integer getFasId() {
		return this.fasId;
	}

	public void setFasId(Integer fasId) {
		this.fasId = fasId;
	}

	@Column(name = "FAS_DESCRIPTION", length = 150)
	public String getFasDescription() {
		return this.fasDescription;
	}

	public void setFasDescription(String fasDescription) {
		this.fasDescription = fasDescription;
	}

	@Column(name = "FAS_NAME", unique = true, nullable = false, length = 50)
	public String getFasName() {
		return this.fasName;
	}

	public void setFasName(String fasName) {
		this.fasName = fasName;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "phase")
	public Set<ExpedientTypePhases> getExpedientTypePhaseses() {
		return this.expedientTypePhaseses;
	}

	public void setExpedientTypePhaseses(
			Set<ExpedientTypePhases> expedientTypePhaseses) {
		this.expedientTypePhaseses = expedientTypePhaseses;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "phase")
	public Set<ExpedientTypePhaseExpedients> getExpedientTypePhaseExpedientses() {
		return this.expedientTypePhaseExpedientses;
	}

	public void setExpedientTypePhaseExpedientses(
			Set<ExpedientTypePhaseExpedients> expedientTypePhaseExpedientses) {
		this.expedientTypePhaseExpedientses = expedientTypePhaseExpedientses;
	}

}
